The PointStateDefinitions element is the parent node that defines the name, description, display order, colors, and alarm condition of each point state available in the specified point scheme. They are combined with Status Bits to create a Point State Instance.
For more information, see Point State and Alarm Condition.
The following table lists and describes the properties of the PointStateDefinitions element.
| Property | Description |
|---|---|
|
Case Sensitive |
Yes |
|
Required |
Yes |
|
Number of Instances Allowed |
1 |
|
Requires End Tag |
Yes |
|
Parent Element |
|
|
Child Element |
The PointStateDefinition element contains the attributes used to configure each point state definition available in the specified point scheme.
The following table lists and describes the properties of the PointStateDefinition element.
| Property | Description |
|---|---|
|
Case Sensitive |
Yes |
|
Required |
Yes |
|
Number of Instances Allowed |
Unlimited |
|
Requires End Tag |
No |
|
Parent Element |
|
|
Attributes |
id name desc displayorder token singlecolor fgcolor bgcolor alarmcondition ext_status |
The following table lists and describes attributes generally applicable to the PointStateDefinition element. The attributes represent properties from a point’s CVS record and are available for use throughout CygNet Software. Also see Point Metadata Methods for more information.
| Attribute | Description |
|---|---|
|
id |
The id assigned to a point state. Value:
|
|
Corresponds to the Point State Name (%pointstatename%) attribute. |
|
|
desc |
Corresponds to the Point State Description (%pointstatedescription%) attribute. |
|
displayorder |
|
|
token |
Corresponds to the Point State Token (%pointstatetoken%) attribute. |
|
singlecolor |
Corresponds to the Point State Single Color (%pointstatesinglecolor%) attribute. Value:
|
|
fgcolor |
Corresponds to the Point State Foreground Color (%pointstateforecolor%) attribute. Value:
|
|
bgcolor |
Corresponds to the Point State Background Color (%pointstatebackcolor%) attribute. Value:
|
| alarmcondition |
Allows for point states to be categorized in an alarm condition. Value:
|
|
Provides a method for mapping the point state to OPC Quality and sub-status values. See Mapping Point State to OPC Quality and Sub-Status for more information. |
The following example shows the link between a Point State Definition and a Point State Instance. The first section defines "POINT_STATE_6" in the point state definition area of the metadata, and the following section shows the point state instance created with a state name of "POINT_STATE_6".
|
<PointStateDefinitions> <PointStateDefinition id="" name="POINT_STATE_6" desc="Point State 6" displayorder="" token="" singlecolor="" fgcolor="" bgcolor="" alarmcondition=""/> </PointStateDefinitions>
<PointStateInstances> <PointStateInstancesForScheme pointschemes=""> <PointStateInstanceDefinitions pointtypes=""> <PointStateInstanceDefinition pointstatename="POINT_STATE_6" precedence="" ovrdesc="" matchmethod=""> <StatusBit bitid=""/> </PointStateInstanceDefinition> </PointStateInstanceDefinitions> </PointStateInstancesForScheme> </PointStateInstances> |
CygNet Studio can be used to preview the color scheme defined in the CvsMetadata file by placing a text tool on a studio screen and specifying the [CustomStateColors] property of the tool.